package com.ruoyi.activiti.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.activiti.domain.ActHiActinst;
import com.ruoyi.activiti.service.IActHiActinstService;

/**
 * 历史节点 提供者
 *
 * @author ruoyi
 * @date 2019-11-27
 */
@RestController
@RequestMapping("actHiActinst")
public class ActHiActinstController extends BaseController
{

	@Autowired
	private IActHiActinstService actHiActinstService;

	/**
	 * 查询${tableComment}
	 */
	@GetMapping("get/{id}")
	public ActHiActinst get(@PathVariable("id") String id)
	{
		return actHiActinstService.selectActHiActinstById(id);

	}

	/**
	 * 查询历史节点列表
	 */
	@GetMapping("list")
	public R list(ActHiActinst actHiActinst)
	{
		startPage();
        return result(actHiActinstService.selectActHiActinstList(actHiActinst));
	}


	/**
	 * 新增保存历史节点
	 */
	@PostMapping("save")
	public R addSave(@RequestBody ActHiActinst actHiActinst)
	{
		return toAjax(actHiActinstService.insertActHiActinst(actHiActinst));
	}

	/**
	 * 修改保存历史节点
	 */
	@PostMapping("update")
	public R editSave(@RequestBody ActHiActinst actHiActinst)
	{
		return toAjax(actHiActinstService.updateActHiActinst(actHiActinst));
	}

	/**
	 * 删除${tableComment}
	 */
	@PostMapping("remove")
	public R remove(String ids)
	{
		return toAjax(actHiActinstService.deleteActHiActinstByIds(ids));
	}

}
